/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package evocarcassonne.core.elements;

import evocarcassonne.core.board.Tile;
import evocarcassonne.core.utils.Feature;

import java.util.List;

/**
 * @author pnaubourg
 */
public class Road extends Element {

    public Road(Tile tile, List<Feature> feats) {
        super(tile, feats);
    }

    public int evaluate() {

        int value = getTiles().size();


        if (getFeatures().contains(Feature.Inn)) {
            if (isComplete()) {
                value *= 2;
            } else
                value = 0;
       }


        return value;
    }


}
